include $(TOPDIR)/rules.mk

PKG_NAME:=libwtinfo
PKG_RELEASE:=1

include $(INCLUDE_DIR)/package.mk

define Package/$(PKG_NAME)
  SECTION:=qmsd
  CATEGORY:=qmsd
  SUBMENU:=libs
  DEPENDS:=+libopenssl +libcjson
  TITLE:=qmsd board info lib
endef

define Package/$(PKG_NAME)/description
 WT wtinfo lib.
endef

TARGET_CFLAGS += -D_GNU_SOURCE

define Build/Prepare
endef

define Build/Configure
endef

define Build/Compile
endef

define Build/InstallDev
	$(INSTALL_DIR) $(1)/usr/include
	$(CP) ./files/wtinfo.h $(1)/usr/include/
	$(INSTALL_DIR) $(1)/usr/lib
	$(INSTALL_BIN) ./files/$(SUBTARGET)/libwtinfo.so $(1)/usr/lib/libwtinfo.so
endef

define Package/$(PKG_NAME)/install
	$(INSTALL_DIR) $(1)/usr/lib
	$(INSTALL_DATA) ./files/$(SUBTARGET)/libwtinfo.so $(1)/usr/lib/libwtinfo.so
endef

$(eval $(call BuildPackage,$(PKG_NAME)))